Optimal. Leaf size=22 \[ -\frac{a}{x}-\frac{b x^{n-1}}{1-n} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0087256, antiderivative size = 22, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.091, Rules used = {14} \[ -\frac{a}{x}-\frac{b x^{n-1}}{1-n} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rubi steps
\begin{align*} \int \frac{a+b x^n}{x^2} \, dx &=\int \left (\frac{a}{x^2}+b x^{-2+n}\right ) \, dx\\ &=-\frac{a}{x}-\frac{b x^{-1+n}}{1-n}\\ \end{align*}
Mathematica [A] time = 0.0099266, size = 22, normalized size = 1. \[ -\frac{a}{x}-\frac{b x^{n-1}}{1-n} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.007, size = 21, normalized size = 1. \begin{align*}{\frac{1}{x} \left ({\frac{b{{\rm e}^{n\ln \left ( x \right ) }}}{-1+n}}-a \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.00154, size = 43, normalized size = 1.95 \begin{align*} -\frac{a n - b x^{n} - a}{{\left (n - 1\right )} x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.393397, size = 32, normalized size = 1.45 \begin{align*} \begin{cases} - \frac{a n}{n x - x} + \frac{a}{n x - x} + \frac{b x^{n}}{n x - x} & \text{for}\: n \neq 1 \\- \frac{a}{x} + b \log{\left (x \right )} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{b x^{n} + a}{x^{2}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]